package com.kqzz.common.service;

import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description 通用Service层基类接口
 * @ClassName IService.java
 * @Package com.kanq.zz.business.service 
 * @author lipeng
 * @date 2018年8月14日 上午11:16:37
 * 
 * @update_Desc
 * @update_Author
 * @update_Date
 *
 *  ██╗     ██╗    ██████╗ ███████╗███╗   ██╗ ██████╗ 
 *	██║     ██║    ██╔══██╗██╔════╝████╗  ██║██╔════╝ 
 *	██║     ██║    ██████╔╝█████╗  ██╔██╗ ██║██║  ███╗
 *	██║     ██║    ██╔═══╝ ██╔══╝  ██║╚██╗██║██║   ██║
 *	███████╗██║    ██║     ███████╗██║ ╚████║╚██████╔╝
 *	╚══════╝╚═╝    ╚═╝     ╚══════╝╚═╝  ╚═══╝ ╚═════╝
 */
@Service
public interface IService<T> {

	List<T> selectAll();

	T selectByKey(Object key);

	int save(T entity);

	int saveNotNull(T entity);
	
	int delete(Object key);

	int batchDelete(List<String> list, String property, Class<T> clazz);
	
	int deleteLogic(Object key);

	int batchDeleteLogic(List<String> list, String property, Class<T> clazz);

	int updateAll(T entity);

	int updateNotNull(T entity);

	List<T> selectByExample(Object example);
	
	PageInfo<T> selectAll(Object example, int currentPage, int pageSize);
}
